<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="系统配置" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<style type="text/css">
<!--
.topbar {font-size:12px;}
.eNav{ height:40px;}
	.eNav li{ background-image:url(/images/nav.gif); background-repeat:no-repeat; width:97px; height:40px; float:left; text-align:center;}
	.eNav li.on{ background-image:url(/images/navOn.gif); background-repeat:no-repeat}
	.eNav li a{ display:block;width:97px; height:36px; line-height:36px; color:#898989; font-weight:bold; text-decoration:none;}
	.eNav li a:hover{text-decoration:none;}
	.eNav li.on a{ color:#515151}
	.eNav li.on a:visited{ color:#515151}
	.eNav li a:visited{ color:#898989}
.grey {color:grey}
-->
</style>
<script language="javascript">
	function doSave(){
		document.getElementById("buttonDiv").style.display="none";
		document.getElementById("waitDiv").style.display="";
		frm.submit();
	}
	function doCancel(){
		window.close();
	}
	function changePriceType(){
		var str="";
		if(document.getElementById("priceType1").checked){
			str="AREA";
		}
		if(document.getElementById("priceType2").checked){
			if(str!=""){
				str=str+";";
			}
			str=str+"LENGTH";
		}
		if(document.getElementById("priceType3").checked){
			if(str!=""){
				str=str+";";
			}
			str=str+"AMOUNT";
		}
		if(str!=""){
			str=";"+str+";";
		}
		document.getElementById("bbPriceType").value=str;
	}
	function changeRadio(objId,val){
		document.getElementById(objId).value=val;
	}
	function doInit(){
		if(checkNavigator()[0]!="msie"){
			document.getElementById("logo_image").className="";
			document.getElementById("login_logo").className="";
		}
		showFormErrorMsg();
	}
	function doShow(index,total){
		for(var i=0;i<total;i++){
			document.getElementById("liTop"+i).className="";
			document.getElementById("contDiv"+i).style.display="none";
		}
		document.getElementById("liTop"+index).className="on";
		document.getElementById("contDiv"+index).style.display="";
	}
</script>
<script language="javascript">
	var formErrorIndex=0;
	var formErrorMsg="";
	var formErrorObjId="";
	function setFormErrorMsg(msg,index,objId){
		if(formErrorIndex==0 || formErrorIndex>index){
			if(msg!=null && msg!=""){
				formErrorIndex=index;
				formErrorMsg=msg;
				formErrorObjId=objId;
			}
		}
	}
	function showFormErrorMsg(){
		if(formErrorIndex!=0){
			document.getElementById("errorMsgTr").style.display="";
			document.getElementById("errorMsgDiv").innerHTML=formErrorMsg;
			if(formErrorObjId!=null && formErrorObjId!=""){
				document.getElementById(formErrorObjId).focus();
			}
		}
	}
	function goNextInput(objId){
		var obj=null;
		if(objId!=null && objId!=''){
			obj=document.getElementById(objId);
		}
		if(window.event.keyCode==13){
			if(obj!=null){
				obj.focus();
			}else if(window.doSave){
				doSave();
			}
		}
	}
</script>
</head>
<body scroll="auto" onload="doInit();" class="sheet modal-dialog" style="padding-top:5px;text-align:center;">
<div class="sheet-main" id="bodyDiv" style="width:860px;text-align:left;margin:auto;">
	<form name="frm" method="post" enctype="multipart/form-data">
	  <div class="sheet-list" style="width:100%">
	    <div class="modal-main search-business">
	    	<div style="width:100%;">
	    		<div class="blank24"></div>
				<ul class="eNav">
					<li id='liTop0' class="topbar on" onClick="doShow(0,5);"><a href="#">常规</a></li>
					<li id='liTop1' class="topbar" onClick="doShow(1,5);"><a href="#">打印</a></li>
					<li id='liTop2' class="topbar" onClick="doShow(2,5);"><a href="#">权限</a></li>
					<li id='liTop3' class="topbar" onClick="doShow(3,5);"><a href="#">流程</a></li>
					<li id='liTop4' class="topbar" onClick="doShow(4,5);"><a href="#">数据</a></li>
				</ul>
				<table width="96%" border="0" cellpadding="0" cellspacing="0" align="center">
					<tr id="errorMsgTr" <c:if test="${alertMsg==null || alertMsg==''}">style="display:none"</c:if>>
					  <td colspan="2">
					  	<div class="msg-error" id="errorMsgDiv">
				      	<c:if test="${alertMsg!=null && alertMsg!=''}">
				      		${alertMsg}
				      		<c:remove var="alertMsg" scope="session" />
				      	</c:if>
				      	</div>
					  </td>
					</tr>
				</table>
				
				<div id="contDiv0">
				<div class="blank12"></div>
				<fieldset class="det_fieldset ">
					<legend class="mag10">公司信息</legend>
					<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-0">
						<tr>
					      	<th style="width:11%">企业名称：</th>			      	
					      	<td style="width:22%">${licenseInfo.enterpriseName}</td>			     	
					      	<th style="width:11%">联系人：</th>
					     	<spring:bind path="command.linkman">
					     	<td style="width:22%">
					     		<input type="text"  class="TextBox" style="width:50px" maxlength="15" onKeyUp="goNextInput('phone');" id="${status.expression}" name="${status.expression}" value="${status.value}">							
						          <script language="javascript">
						          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',2,'linkman');
						          </script>
					     	</td>
					     	</spring:bind>
					      	<th style="width:11%">联系电话：</th>
					      	<spring:bind path="command.phone">
					      	<td style="width:23%">
					      		<input type="text"  class="TextBox" maxlength="25" onKeyUp="goNextInput('fax');" id="${status.expression}" name="${status.expression}" value="${status.value}">
						          <script language="javascript">
						          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',3,'phone');
						          </script>
					      	</td>
					      	</spring:bind>
					    </tr>
					    <tr>
					    	<th>传真：</th>
					    	<spring:bind path="command.fax">
					    	<td>
					    		<input type="text"  class="TextBox" maxlength="25" onKeyUp="goNextInput('address');" id="${status.expression}" name="${status.expression}" value="${status.value}">
						          <script language="javascript">
						          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',4,'fax');
						          </script>
					    	</td>
					    	</spring:bind>
					    	<th>地址：</th>
					    	<spring:bind path="command.address">
					    	<td>
					    		<input type="text"  class="TextBox" maxlength="50" onKeyUp="goNextInput('postcode');" id="${status.expression}" name="${status.expression}" value="${status.value}">
						          <script language="javascript">
						          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',5,'address');
						          </script>
					    	</td>
					    	</spring:bind>
					    	<th>邮编：</th>
					    	<spring:bind path="command.postcode">
					    	<td>
					    		<input type="text"  class="TextBox" style="width:50px" maxlength="10" onKeyUp="goNextInput('qq');" id="${status.expression}" name="${status.expression}" value="${status.value}">
						          <script language="javascript">
						          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',6,'postcode');
						          </script>
					    	</td>
					    	</spring:bind>
					    </tr>
					    <tr>
					    	<th>QQ：</th>
					    	<spring:bind path="command.qq">
					    	<td>
					    		<input type="text" class="TextBox" maxlength="25" id="${status.expression}" name="${status.expression}" value="${status.value}">
						          <script language="javascript">
						          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',7,'qq');
						          </script>
					    	</td>
					    	</spring:bind>
					    	<th>&nbsp;</th>
					    	<td>&nbsp;</td>
					    	<th>&nbsp;</th>
					    	<td>&nbsp;</td>
					    </tr>
					</table>
				</fieldset>
				
				<div class="blank12"></div>
				<fieldset class="det_fieldset ">
					<legend class="mag10">系统参数</legend>
					<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-0">
						<tr>
							<th style="width:11%">文件上传端口：</th>
					    	<spring:bind path="command.uploadPort">
					    	<td style="width:22%">
					    		<input type="text" class="TextBox" style="width:50px" maxlength="4" onKeyUp="goNextInput('loginLimit');" id="${status.expression}" name="${status.expression}" value="${status.value}" title="默认是1500，建议不要修改，防火墙需要设置允许外部访问这个端口">
								<c:if test="${status.errorCode=='typeMismatch'}">
						          <script language="javascript">
						          	setFormErrorMsg('文件上传端口只能输入整数',7,'uploadPort');
						          </script>
						      	</c:if>
					    	</td>
					    	</spring:bind>
							<th style="width:11%">登录尝试次数：</th>
					    	<spring:bind path="command.loginLimit">
					    	<td style="width:22%">
					    		<input type="text"  class="TextBox" style="width:50px" maxlength="1" onKeyUp="goNextInput('lockHour');" id="${status.expression}" name="${status.expression}" value="${status.value}" title="如果密码错误时，可以重复尝试多少次，一旦超过设定的次数，系统将自动锁定该用户账号，禁止该用户登录系统。">次
								<c:if test="${status.errorCode=='typeMismatch'}">
						          <script language="javascript">
						          	setFormErrorMsg('登录最多尝试次数只能输入整数',8,'loginLimit');
						          </script>
						      	</c:if>
					    	</td>
					    	</spring:bind>
							<th style="width:11%">用户锁定时间：</th>
					    	<spring:bind path="command.lockHour">
					    	<td style="width:23%">
					    		<input type="text"  class="TextBox" style="width:50px" maxlength="1" onKeyUp="goNextInput('msgInterval');" id="${status.expression}" name="${status.expression}" value="${status.value}">小时
								<c:if test="${status.errorCode=='typeMismatch'}">
						          <script language="javascript">
						          	setFormErrorMsg('用户锁定时间只能输入整数',9,'lockHour');
						          </script>
						      	</c:if>
					    	</td>
					    	</spring:bind>
						</tr>
						<tr>
							<th>消息刷新间隔：</th>
					    	<spring:bind path="command.msgInterval">
					    	<td>
					    		<input type="text" class="TextBox" style="width:50px" maxlength="4" onKeyUp="goNextInput('pageSize');" id="${status.expression}" name="${status.expression}" value="${status.value}" title="系统根据这个设置，定时检查是否有新消息到来，有新消息会弹出窗口提醒">分
						        <c:if test="${status.errorCode=='typeMismatch'}">
						          <script language="javascript">
						          	setFormErrorMsg('消息刷新间隔必须是整数，请重新录入',10,'msgInterval');
						          </script>
						        </c:if>
					    	</td>
					    	</spring:bind>
					    	<th>记录显示行数：</th>
					    	<spring:bind path="command.pageSize">
					    	<td>
					    		<input type="text"  class="TextBox" style="width:50px" maxlength="2" id="${status.expression}" name="${status.expression}" value="${status.value}" title="用于定义记录进行分页，每一页的记录数。">
								<c:if test="${status.errorCode=='typeMismatch'}">
						          <script language="javascript">
						          	setFormErrorMsg('记录列表显示行数只能输入整数',11,'pageSize');
						          </script>
						      	</c:if>
					    	</td>
					    	</spring:bind>
					    	<th>业务单计价：</th>
					    	<td title="对于单一业务的广告公司，可以在系统配置上，设定业务单计价方式，例如专业喷绘写真公司，不要对“成品计价”与“长度计价”打勾，这样开单界面就只有平方计价的项目；而专业条幅公司，不要对“成品计价”与“平方计价”打勾，这样开单界面就只有长度计价的项目；标识工程公司，就只要选中“成品计价”就可以了。">
								<input type="checkbox" name="priceType1" id="priceType1" onClick="changePriceType();" <c:if test="${fn:indexOf(command.bbPriceType,'AREA')!=-1}">checked</c:if>>面积
								<input type="checkbox" name="priceType2" id="priceType2" onClick="changePriceType();" <c:if test="${fn:indexOf(command.bbPriceType,'LENGTH')!=-1}">checked</c:if>>长度
								<input type="checkbox" name="priceType3" id="priceType3" onClick="changePriceType();" <c:if test="${fn:indexOf(command.bbPriceType,'AMOUNT')!=-1}">checked</c:if>>成品
								<spring:bind path="command.bbPriceType">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
							</td>
						</tr>
					</table>
				</fieldset>
				
				<div class="blank12"></div>
				<fieldset class="det_fieldset ">
					<legend class="mag10">数据备份</legend>
					<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-0">
						<tr>
							<th style="width:11%">数据自动备份：</th>
					    	<td style="width:22%">
								<input type="radio" name="r_dbAb" id="r_dbAb1" onClick="changeRadio('dbAb','Y');" <c:if test="${command.dbAb=='Y'}">checked</c:if>>是
								<input type="radio" name="r_dbAb" id="r_dbAb2" onClick="changeRadio('dbAb','N');" <c:if test="${command.dbAb=='N'}">checked</c:if>>否
								<spring:bind path="command.dbAb">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
					    	</td>
							<th style="width:11%">自动备份时间：</th>
					    	<td style="width:22%">
								<spring:bind path="command.dbAbHour">
								<select id="${status.expression}" name="${status.expression}">
									<c:forEach var="item" begin="0" step="1" end="23" varStatus="i"><c:if test="${i.index<10}"><c:set var="item" value="0${item}" /></c:if><option value="${item}" <c:if test="${item==status.value}">selected</c:if>>${item}</option></c:forEach>
								</select>时
								</spring:bind>
								<spring:bind path="command.dbAbMinute">
								<select id="${status.expression}" name="${status.expression}">
									<c:forEach var="item" begin="0" step="10" end="59" varStatus="i"><c:if test="${i.index<10}"><c:set var="item" value="0${item}" /></c:if><option value="${item}" <c:if test="${item==status.value}">selected</c:if>>${item}</option></c:forEach>
								</select>分
								</spring:bind>
					    	</td>
							<th style="width:11%">数据备份目录：</th>
					    	<spring:bind path="command.dbBackupFolder">
					    	<td style="width:23%">
					    		<input type="text" class="TextBox" maxlength="50" id="${status.expression}" name="${status.expression}" value="${status.value}" title="如果指定了备份目录(可以指定到另一台电脑上，或者指定到U盘)，强烈建议您使用U盘，那么除了默认目录备份之外，还会在这个指定的备份目录下再备份一次！">
						          <script language="javascript">
						          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',12,'dbBackupFolder');
						          </script>
					    	</td>
					    	</spring:bind>
						</tr>
						<tr>
							<th>备份自动删除：</th>
					    	<td>
								<input type="radio" name="r_dbAdel" id="r_dbAdel1" onClick="changeRadio('dbAdel','Y');" <c:if test="${command.dbAdel=='Y'}">checked</c:if>>2周前备份
								<input type="radio" name="r_dbAdel" id="r_dbAdel2" onClick="changeRadio('dbAdel','N');" <c:if test="${command.dbAdel=='N'}">checked</c:if>>否
								<spring:bind path="command.dbAdel">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
					    	</td>
							<th>&nbsp;</th>
					    	<td>&nbsp;</td>
							<th>&nbsp;</th>
					    	<td>&nbsp;</td>
						</tr>
					</table>
				</fieldset>
				
				<div class="blank12"></div>
				<fieldset class="det_fieldset ">
					<legend class="mag10">界面参数</legend>
					<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-0">
						<tr>
							<th style="width:11%"><span class="MustInput">*</span>企业简称：</th>
					    	<spring:bind path="command.shortName">
					    	<td style="width:22%">
					    		<input type="text" class="TextBox" maxlength="10" onKeyUp="goNextInput('slogan');" id="${status.expression}" name="${status.expression}" value="${status.value}" title="发送手机短信时，企业简称将作为签名档">
						          <script language="javascript">
						          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',13,'shortName');
						          </script>
					    	</td>
					    	</spring:bind>
							<th style="width:11%">企业口号：</th>
					    	<spring:bind path="command.slogan">
					    	<td style="width:22%">
					    		<input type="text" class="TextBox" maxlength="50" onKeyUp="goNextInput('logo_image');" id="${status.expression}" name="${status.expression}" value="${status.value}" title="用于描述企业的经营宗旨、质量目标、企业文化等，将出现在登录窗口上。">
						          <script language="javascript">
						          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',14,'slogan');
						          </script>
					    	</td>
					    	</spring:bind>
					    	<th style="width:11%">登录页Logo：</th>			    	
					    	<td style="width:23%">
					    		<input type="file"  class="TextBox" style="width:120px" onKeyUp="goNextInput('login_logo');" name="logo_image" id="logo_image" title="">
					    		<c:if test="${command.image!=null && command.image!=''}"><a href="${command.image}" target="_blank">查看</a></c:if>
								<spring:bind path="command.image">
							          <script language="javascript">
							          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',15,'logo_image');
							          </script>
						      	</spring:bind>
					    	</td>
						</tr>
						<tr>
							<th>打印单Logo：</th>			    	
					    	<td>
					    		<input type="file" class="TextBox" style="width:120px" name="login_logo" id="login_logo" title="企业Logo将出现在单据打印上，包括业务单、送货单、收款单等单据。">
					    		<c:if test="${command.loginImage!=null && command.loginImage!=''}"><a href="${command.loginImage}" target="_blank">查看</a></c:if>
								<spring:bind path="command.loginImage">
							          <script language="javascript">
							          	setFormErrorMsg('<c:out value="${status.errorMessage}" />',16,'login_logo');
							          </script>
						      	</spring:bind>
					    	</td>
					    	<th>桌面显示：</th>
							<td title="">
								<input type="radio" name="r_deskType" id="deskType1" onClick="changeRadio('deskType','MSG');" <c:if test="${command.deskType=='MSG'}">checked</c:if>>公告消息
								<input type="radio" name="r_deskType" id="deskType2" onClick="changeRadio('deskType','FLOW');" <c:if test="${command.deskType=='FLOW'}">checked</c:if>>业务流程图
								<spring:bind path="command.deskType">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
							</td>
							<th>&nbsp;</th>
					    	<td>&nbsp;</td>
						</tr>
					</table>
				</fieldset>
				</div>
				
				<div id="contDiv1" style="display:none">
				<div class="blank12"></div>
				<fieldset class="det_fieldset ">
					<legend class="mag10">打印参数</legend>
					<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-0">
						<tr>
							<th style="width:15%" height="40">打印处理：</th>
							<td style="width:85%">
								<input type="radio" name="r_doPrint" id="r_doPrint1" onClick="changeRadio('doPrint','PRINT');" <c:if test="${command.doPrint=='PRINT'}">checked</c:if>>直接打印
								<input type="radio" name="r_doPrint" id="r_doPrint2" onClick="changeRadio('doPrint','PREVIEW');" <c:if test="${command.doPrint=='PREVIEW'}">checked</c:if>>打印预览
								<input type="radio" name="r_doPrint" id="r_doPrint3" onClick="changeRadio('doPrint','SELECT');" <c:if test="${command.doPrint=='SELECT'}">checked</c:if>>选择打印机
								<spring:bind path="command.doPrint">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">打印预览用于打印调试，已经可以正常打印就不要选择打印预览；直接打印用于电脑只有一台打印机，且已调试正常；选择打印机用于电脑有多台打印机的情况。</span>
							</td>
						</tr>
						<tr>
							<th  height="40">打印宽度：</th>
							<td>
								<input type="radio" name="r_printWidth" id="r_printWidth1" onClick="changeRadio('printWidth','FIXED');" <c:if test="${command.printWidth=='FIXED'}">checked</c:if>>固定
								<input type="radio" name="r_printWidth" id="r_printWidth2" onClick="changeRadio('printWidth','ALL');" <c:if test="${command.printWidth=='ALL'}">checked</c:if>>100%
								<spring:bind path="command.printWidth">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果页面左右还有较多空间，可以选择为100%，尽可能利用纸张宽度。</span>
							</td>
						</tr>
						<tr>
							<th height="40">业务单图片：</th>			    	
					    	<td>
								<input type="radio" name="r_bbpi" id="r_bbpi1" onClick="changeRadio('bbPrintImage','Y');" <c:if test="${command.bbPrintImage=='Y'}">checked</c:if>>显示
								<input type="radio" name="r_bbpi" id="r_bbpi2" onClick="changeRadio('bbPrintImage','N');" <c:if test="${command.bbPrintImage=='N'}">checked</c:if>>隐藏
								<spring:bind path="command.bbPrintImage">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">上传业务单的图片，如果设置为显示，就会在业务单打印中显示</span>
					    	</td>
					    </tr>
					    <tr>
							<th height="40">制作单图片：</th>
							<td>
								<input type="radio" name="r_mbpi" id="r_mbpi1" onClick="changeRadio('mbPrintImage','Y');" <c:if test="${command.mbPrintImage=='Y'}">checked</c:if>>显示
								<input type="radio" name="r_mbpi" id="r_mbpi2" onClick="changeRadio('mbPrintImage','N');" <c:if test="${command.mbPrintImage=='N'}">checked</c:if>>隐藏
								<spring:bind path="command.mbPrintImage">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">上传业务单的图片，如果设置为显示，就会在制作单打印中显示，图片选择的工作中心要与制作单所在的工作中心相同</span>
							</td>
						</tr>
						<tr>
							<th height="40">安装单图片：</th>
							<td>
								<input type="radio" name="r_stpi" id="r_stpi1" onClick="changeRadio('setuPrintImage','Y');" <c:if test="${command.setuPrintImage=='Y'}">checked</c:if>>显示
								<input type="radio" name="r_stpi" id="r_stpi2" onClick="changeRadio('setuPrintImage','N');" <c:if test="${command.setuPrintImage=='N'}">checked</c:if>>隐藏
								<spring:bind path="command.setuPrintImage">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">上传安装单的小样图与完工效果图，如果设置为显示，就会在安装单打印中显示</span>
							</td>
						</tr>
					    <tr>
							<th height="40">业务单条形码：</th>			    	
					    	<td title="">
								<input type="radio" name="r_busiBc" id="r_busiBc1" onClick="changeRadio('busiBc','Y');" <c:if test="${command.busiBc=='Y'}">checked</c:if>>显示
								<input type="radio" name="r_busiBc" id="r_busiBc2" onClick="changeRadio('busiBc','N');" <c:if test="${command.busiBc=='N'}">checked</c:if>>隐藏
								<spring:bind path="command.busiBc">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为显示，业务单打印时会显示业务单号的条形码</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">制作单条形码：</th>			    	
					    	<td title="">
								<input type="radio" name="r_makeBc" id="r_makeBc1" onClick="changeRadio('makeBc','Y');" <c:if test="${command.makeBc=='Y'}">checked</c:if>>显示
								<input type="radio" name="r_makeBc" id="r_makeBc2" onClick="changeRadio('makeBc','N');" <c:if test="${command.makeBc=='N'}">checked</c:if>>隐藏
								<spring:bind path="command.makeBc">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为显示，制作单打印时会显示业务单号的条形码</span>
					    	</td>
					    </tr>
					    <tr>
							<th height="40">送货单条形码：</th>			    	
					    	<td title="">
								<input type="radio" name="r_deliBc" id="r_deliBc1" onClick="changeRadio('deliBc','Y');" <c:if test="${command.deliBc=='Y'}">checked</c:if>>显示
								<input type="radio" name="r_deliBc" id="r_deliBc2" onClick="changeRadio('deliBc','N');" <c:if test="${command.deliBc=='N'}">checked</c:if>>隐藏
								<spring:bind path="command.deliBc">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为显示，送货单打印时会显示送货单号的条形码</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">安装单条形码：</th>			    	
					    	<td title="">
								<input type="radio" name="r_setuBc" id="r_setuBc1" onClick="changeRadio('setuBc','Y');" <c:if test="${command.setuBc=='Y'}">checked</c:if>>显示
								<input type="radio" name="r_setuBc" id="r_setuBc2" onClick="changeRadio('setuBc','N');" <c:if test="${command.setuBc=='N'}">checked</c:if>>隐藏
								<spring:bind path="command.setuBc">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为显示，安装单打印时会显示安装单号的条形码</span>
					    	</td>
						</tr>
					</table>
				</fieldset>
				</div>
				
				<div id="contDiv2" style="display:none">
				<div class="blank12"></div>
				<fieldset class="det_fieldset ">
					<legend class="mag10">权限</legend>
					<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-0">
						<tr>
							<th style="width:15%" height="40">业务单联系人：</th>
							<td style="width:85%">
								<input type="radio" name="r_selectContact" id="r_selectContact1" onClick="changeRadio('selectContact','ALL');" <c:if test="${command.selectContact=='ALL'}">checked</c:if>>全部可选
								<input type="radio" name="r_selectContact" id="r_selectContact2" onClick="changeRadio('selectContact','SELF');" <c:if test="${command.selectContact=='SELF'}">checked</c:if>>自己客户可选
								<spring:bind path="command.selectContact">
									<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置自己客户可选，除非客户的经办人是自己，否则在业务单上不能查看到这个客户的联系人</span>
							</td>
						</tr>
						<tr>
							<th height="40">工作中心：</th>
					    	<td>
								<input type="radio" name="r_workCenter" id="r_workCenter1" onClick="changeRadio('workCenter','Y');" <c:if test="${command.workCenter=='Y'}">checked</c:if>>区分权限
								<input type="radio" name="r_workCenter" id="r_workCenter2" onClick="changeRadio('workCenter','N');" <c:if test="${command.workCenter=='N'}">checked</c:if>>不区分权限
								<spring:bind path="command.workCenter">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为区分权限，必须进入“用户权限”为每个用户授权对哪个工作中心具备权限，否则在制作管理中将看不到制作单</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">银行账户：</th>
					    	<td>
								<input type="radio" name="r_bapr" id="r_bapr1" onClick="changeRadio('bankPr','Y');" <c:if test="${command.bankPr=='Y'}">checked</c:if>>区分权限
								<input type="radio" name="r_bapr" id="r_bapr2" onClick="changeRadio('bankPr','N');" <c:if test="${command.bankPr=='N'}">checked</c:if>>不区分权限
								<spring:bind path="command.bankPr">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为区分权限，必须进入“用户权限”为每个用户授权对哪个银行账户具备权限，否则在单据中无法看到与选择银行账户</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">银行账户：</th>
					    	<td title="">
								<input type="radio" name="r_bankTs" id="r_bankTs1" onClick="changeRadio('bankTs','Y');" <c:if test="${command.bankTs=='Y'}">checked</c:if>>分帐套
								<input type="radio" name="r_bankTs" id="r_bankTs2" onClick="changeRadio('bankTs','N');" <c:if test="${command.bankTs=='N'}">checked</c:if>>不分帐套
								<spring:bind path="command.bankTs">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为不分账套，所有账套可以共用相同的银行账户</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">仓库：</th>
					    	<td title="">
								<input type="radio" name="r_storTs" id="r_storTs1" onClick="changeRadio('storTs','Y');" <c:if test="${command.storTs=='Y'}">checked</c:if>>分帐套
								<input type="radio" name="r_storTs" id="r_storTs2" onClick="changeRadio('storTs','N');" <c:if test="${command.storTs=='N'}">checked</c:if>>不分帐套
								<spring:bind path="command.storTs">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为不分账套，所有账套可以共用相同的仓库</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">往来单位：</th>
					    	<td>
								<input type="radio" name="r_baseTs" id="r_baseTs1" onClick="changeRadio('baseTs','Y');" <c:if test="${command.baseTs=='Y'}">checked</c:if>>分帐套
								<input type="radio" name="r_baseTs" id="r_baseTs2" onClick="changeRadio('baseTs','N');" <c:if test="${command.baseTs=='N'}">checked</c:if>>不分帐套
								<spring:bind path="command.baseTs">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为不分账套，所有账套可以共用客户、供应商、外协商</span>
					    	</td>
						</tr>
						<tr>
					    	<spring:bind path="command.earlDataDays">
							<th height="40">禁止看N天前数据：</th>
					    	<td>
								<input type="text" class="TextBox" style="width:50px" maxlength="4" id="${status.expression}" name="${status.expression}" value="${status.value}" title="">天
						        <c:if test="${status.errorCode=='typeMismatch'}">
						        <script language="javascript">
						          	setFormErrorMsg('禁止查看N天前的数据必须是整数，请重新录入',17,'earlDataDays');
						        </script>
						        </c:if>
						        <span class="grey">用于设置用户权限“禁止查看N天前的数据”，多少天就在这里定义</span>
					    	</td>
					    	</spring:bind>
					    </tr>
					</table>
				</fieldset>
				</div>
				
				<div id="contDiv3" style="display:none">
				<div class="blank12"></div>
				<fieldset class="det_fieldset ">
					<legend class="mag10">流程</legend>
					<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-0">
						<tr>
							<th style="width:15%" height="40">业务单审核：</th>
					    	<td style="width:85%">
								<input type="radio" name="r_busiAutoExamine" id="r_busiAutoExamine1" onClick="changeRadio('busiAutoExamine','Y');" <c:if test="${command.busiAutoExamine=='Y'}">checked</c:if>>自动审核
								<input type="radio" name="r_busiAutoExamine" id="r_busiAutoExamine2" onClick="changeRadio('busiAutoExamine','N');" <c:if test="${command.busiAutoExamine=='N'}">checked</c:if>>手工审核
								<spring:bind path="command.busiAutoExamine">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置自动审核，业务单一保存就是已审核状态</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">业务单送货：</th>
					    	<td>
								<input type="radio" name="r_dac" id="r_dac1" onClick="changeRadio('deliAutoComp','Y');" <c:if test="${command.deliAutoComp=='Y'}">checked</c:if>>自动完工
								<input type="radio" name="r_dac" id="r_dac2" onClick="changeRadio('deliAutoComp','N');" <c:if test="${command.deliAutoComp=='N'}">checked</c:if>>手动完工
								<spring:bind path="command.deliAutoComp">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置自动完工，业务单只要送完货，就自动标记业务单为已完工</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">业务单结清：</th>
					    	<td>
								<input type="radio" name="r_busiClos" id="r_busiClos1" onClick="changeRadio('busiClos','HAND_CD');" <c:if test="${command.busiClos=='HAND_CD'}">checked</c:if>>手动完工送货
								<input type="radio" name="r_busiClos" id="r_busiClos2" onClick="changeRadio('busiClos','AUTO_CD');" <c:if test="${command.busiClos=='AUTO_CD'}">checked</c:if>>自动完工送货
								<spring:bind path="command.busiClos">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为自动完工送货，只要业务单结清 ，就自动标记业务单为已完工已送货</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">业务单外协：</th>
					    	<td>
								<input type="radio" name="r_busiCooComp" id="r_busiCooComp1" onClick="changeRadio('busiCooComp','Y');" <c:if test="${command.busiCooComp=='Y'}">checked</c:if>>自动完成
								<input type="radio" name="r_busiCooComp" id="r_busiCooComp2" onClick="changeRadio('busiCooComp','N');" <c:if test="${command.busiCooComp=='N'}">checked</c:if>>手工完成
								<spring:bind path="command.busiCooComp">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置自动完成，业务单只要开了外协单，就自动标记业务单为外协已完工，不能再开外协单</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">采购单入库：</th>
					    	<td>
								<input type="radio" name="r_purcStoc" id="r_purcStoc1" onClick="changeRadio('purcStoc','Y');" <c:if test="${command.purcStoc=='Y'}">checked</c:if>>自动入库
								<input type="radio" name="r_purcStoc" id="r_purcStoc2" onClick="changeRadio('purcStoc','N');" <c:if test="${command.purcStoc=='N'}">checked</c:if>>手工入库
								<spring:bind path="command.purcStoc">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置自动入库，那么采购单审核通过后，自动生成入库记录，增加库存。</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">业务单材质：</th>
					    	<td title="">
								<input type="radio" name="r_busiProd" id="r_busiProd1" onClick="changeRadio('busiProd','INPUT');" <c:if test="${command.busiProd=='INPUT'}">checked</c:if>>手工填写
								<input type="radio" name="r_busiProd" id="r_busiProd2" onClick="changeRadio('busiProd','SELECT');" <c:if test="${command.busiProd=='SELECT'}">checked</c:if>>从材料中选
								<spring:bind path="command.busiProd">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置只能从材料中选，可以方便开出库单时，自动带出该业务单的材质</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">上传设计文件：</th>
					    	<td>
								<input type="radio" name="r_busiUplo" id="r_busiUplo1" onClick="changeRadio('busiUplo','UNEXA');" <c:if test="${command.busiUplo=='UNEXA'}">checked</c:if>>未审核
								<input type="radio" name="r_busiUplo" id="r_busiUplo2" onClick="changeRadio('busiUplo','UNMAK');" <c:if test="${command.busiUplo=='UNMAK'}">checked</c:if>>已审核未开工
								<spring:bind path="command.busiUplo">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为已审核未开工，表示在这个状态下业务单可以上传设计文件；如果设置为未审核，就只有未审核的业务单才能上传设计文件</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">业务单完工：</th>
					    	<td>
								<input type="radio" name="r_busiComp" id="r_busiComp1" onClick="changeRadio('busiComp','MAKED');" <c:if test="${command.busiComp=='MAKED'}">checked</c:if>>已开工
								<input type="radio" name="r_busiComp" id="r_busiComp2" onClick="changeRadio('busiComp','ALL');" <c:if test="${command.busiComp=='ALL'}">checked</c:if>>全部
								<spring:bind path="command.busiComp">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为已开工，只有已开工的业务单，才能进行完工操作，在“业务单完工”那里才看得到</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">业务单改单：</th>
					    	<td>
								<input type="radio" name="r_busi_modi" id="r_busi_modi1" onClick="changeRadio('busiModi','N');" <c:if test="${command.busiModi=='N'}">checked</c:if>>有收款单不允许
								<input type="radio" name="r_busi_modi" id="r_busi_modi2" onClick="changeRadio('busiModi','Y');" <c:if test="${command.busiModi=='Y'}">checked</c:if>>允许
								<spring:bind path="command.busiModi">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为有收款单不允许，业务单一旦开了收款单，就不能再做修改</span>
					    	</td>
						</tr>
						<tr>
							<th height="40">外协单改单：</th>
					    	<td>
								<input type="radio" name="r_coop_modi" id="r_coop_modi1" onClick="changeRadio('coopModi','N');" <c:if test="${command.coopModi=='N'}">checked</c:if>>有付款单不允许
								<input type="radio" name="r_coop_modi" id="r_coop_modi2" onClick="changeRadio('coopModi','Y');" <c:if test="${command.coopModi=='Y'}">checked</c:if>>允许
								<spring:bind path="command.coopModi">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果设置为有付款单不允许，外协单一旦开了付款单，就不能再做修改</span>
					    	</td>
						</tr>
					</table>
				</fieldset>
				</div>
				
				<div id="contDiv4" style="display:none">
				<div class="blank12"></div>
				<fieldset class="det_fieldset ">
					<legend class="mag10">数据</legend>
					<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-0">
						<tr>
							<th style="width:15%" height="40">长度计价项目：</th>
					    	<td style="width:85%">
					    		以[
								<input type="radio" name="r_busiLengType" id="r_busiLengType1" onClick="changeRadio('busiLengType','MAX');" <c:if test="${command.busiLengType=='MAX'}">checked</c:if>>最长边
								<input type="radio" name="r_busiLengType" id="r_busiLengType2" onClick="changeRadio('busiLengType','WIDTH');" <c:if test="${command.busiLengType=='WIDTH'}">checked</c:if>>宽
								<input type="radio" name="r_busiLengType" id="r_busiLengType3" onClick="changeRadio('busiLengType','TALL');" <c:if test="${command.busiLengType=='TALL'}">checked</c:if>>高
								]计算
								<spring:bind path="command.busiLengType">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">设置业务单与外协单的长度计价项目的长度计算依据</span>
					    	</td>
					    </tr>
					    <tr>
							<th height="40">长度计价单位：</th>
					    	<td>
								<input type="radio" name="r_lengType" id="r_lengType1" onClick="changeRadio('lengType','M');" <c:if test="${command.lengType=='M'}">checked</c:if>>m
								<input type="radio" name="r_lengType" id="r_lengType2" onClick="changeRadio('lengType','CM');" <c:if test="${command.lengType=='CM'}">checked</c:if>>cm
								<spring:bind path="command.lengType">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">选择长度计价默认的单位，如果是公分，就选择cm</span>
					    	</td>
					    </tr>
					    <tr>
							<th height="40">面积宽高单位：</th>
					    	<td>
								<input type="radio" name="r_areaType" id="r_areaType1" onClick="changeRadio('areaType','M');" <c:if test="${command.areaType=='M'}">checked</c:if>>m
								<input type="radio" name="r_areaType" id="r_areaType2" onClick="changeRadio('areaType','MM');" <c:if test="${command.areaType=='MM'}">checked</c:if>>mm
								<spring:bind path="command.areaType">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">选择平方计价默认宽与高的单位</span>
					    	</td>
					    </tr>
					    <tr>
							<th height="40">业务单业务员默认：</th>
					    	<td>
					    		<input type="radio" name="r_busiMng" id="r_busiMng1" onClick="changeRadio('busiMng','EST_MNG');" <c:if test="${command.busiMng=='EST_MNG'}">checked</c:if>>客户经办人
								<input type="radio" name="r_busiMng" id="r_busiMng2" onClick="changeRadio('busiMng','CREA');" <c:if test="${command.busiMng=='CREA'}">checked</c:if>>开单人
								<spring:bind path="command.busiMng">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
					    	</td>
					    </tr>
					    <tr>
							<th height="40">业务单跟单员默认：</th>
					    	<td>
					    		<input type="radio" name="r_busiFoll" id="r_busiFoll1" onClick="changeRadio('busiFoll','EST_MNG');" <c:if test="${command.busiFoll=='EST_MNG'}">checked</c:if>>客户经办人
								<input type="radio" name="r_busiFoll" id="r_busiFoll2" onClick="changeRadio('busiFoll','CREA');" <c:if test="${command.busiFoll=='CREA'}">checked</c:if>>开单人
								<spring:bind path="command.busiFoll">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
					    	</td>
					    </tr>
					    <tr>
							<th height="40">业务单设计员默认：</th>
					    	<td>
					    		<input type="radio" name="r_busiDesi" id="r_busiDesi1" onClick="changeRadio('busiDesi','EST_MNG');" <c:if test="${command.busiDesi=='EST_MNG'}">checked</c:if>>客户经办人
								<input type="radio" name="r_busiDesi" id="r_busiDesi2" onClick="changeRadio('busiDesi','CREA');" <c:if test="${command.busiDesi=='CREA'}">checked</c:if>>开单人
								<spring:bind path="command.busiDesi">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
					    	</td>
					    </tr>
					    <tr>
							<th height="40">出库选择业务单：</th>
					    	<td>
					    		<input type="radio" name="r_outBusi" id="r_outBusi1" onClick="changeRadio('outBusi','CURR');" <c:if test="${command.outBusi=='CURR'}">checked</c:if>>当前账套的业务单
								<input type="radio" name="r_outBusi" id="r_outBusi2" onClick="changeRadio('outBusi','ALL');" <c:if test="${command.outBusi=='ALL'}">checked</c:if>>所有账套的业务单
								<spring:bind path="command.outBusi">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果选择所有账套，就表示可以选择把出库成本计入到任何一个账套的业务单上</span>
					    	</td>
					    </tr>
					    <tr>
							<th height="40">费用选择业务单：</th>
					    	<td>
					    		<input type="radio" name="r_feeBusi" id="r_feeBusi1" onClick="changeRadio('feeBusi','CURR');" <c:if test="${command.feeBusi=='CURR'}">checked</c:if>>当前账套的业务单
								<input type="radio" name="r_feeBusi" id="r_feeBusi2" onClick="changeRadio('feeBusi','ALL');" <c:if test="${command.feeBusi=='ALL'}">checked</c:if>>所有账套的业务单
								<spring:bind path="command.feeBusi">
								<input type="hidden" name="${status.expression}" id="${status.expression}" value="${status.value}">
								</spring:bind>
								<span class="grey">如果选择所有账套，就表示可以选择把费用成本计入到任何一个账套的业务单上</span>
					    	</td>
					    </tr>
					</table>
				</fieldset>
				</div>
			</div>
	  	</div>
	  </div>
	  <div class="modal-buttom" id="buttonDiv">
		<input type="button" class="buttom-a" value=" 保 存 " onClick="doSave();">
		<input type="button" class="buttom-a" value=" 取 消 " onClick="doCancel();">
	</div>
	<div class="modal-buttom" id="waitDiv" style="display:none">
		<span style="color:#ffffff">请稍候...</span>
	</div>
	</form>
</div>
<iframe id="httpFrame" name="httpFrame" scrolling="no" width="98%" height="0" frameborder="0"></iframe>
</body>
</html>
<c:if test="${updateRemote=='1'}">
<script language="javascript">
	var accountName=encodeURIComponent("<c:out value="${licenseInfo.enterpriseName}" />");
	var seqCode=encodeURIComponent("<c:out value="${licenseInfo.sequenceCode}" />");
	var macCode=encodeURIComponent("<c:out value="${licenseInfo.machineCode}" />");
	var proxyCode=encodeURIComponent("<c:out value="${licenseInfo.proxyCode}" />");
	
	var linkmanName=encodeURIComponent("<c:out value="${command.linkman}" />");
	var phoneCall=encodeURIComponent("<c:out value="${command.phone}" />");
	var accountAddress=encodeURIComponent("<c:out value="${command.address}" />");
	var zipCode=encodeURIComponent("<c:out value="${command.postcode}" />");
	var fax=encodeURIComponent("<c:out value="${command.fax}" />");
	
	if(seqCode!=""){
		var url="http://www.ekingcn.net:8000/TJCRM?URL=userReg&accountName="+accountName+"&seqCode="+seqCode+"&macCode="+macCode+"&proxyCode="+proxyCode+"&linkmanName="+linkmanName+"&phoneCall="+phoneCall+"&zipCode="+zipCode+"&accountAddress="+accountAddress+"&fax="+fax;
		//document.getElementById("httpFrame").src=url;
	}
	
	//try{
	//	var xmlHttp=createXMLHttpRequest();
	//	xmlHttp.open("GET", url);
	//	xmlHttp.send(null);
	//}catch(e){}
</script>
</c:if>
